Xaml NativeComponent added to Sample Fabric#15626
Open
vineethkuttan wants to merge 3 commits intomicrosoft:mainfrom
Open
Xaml NativeComponent added to Sample Fabric#15626vineethkuttan wants to merge 3 commits intomicrosoft:mainfrom
vineethkuttan wants to merge 3 commits intomicrosoft:mainfrom
Conversation
| m_comboBox.SelectionChangedTrigger(winrt::Microsoft::UI::Xaml::Controls::ComboBoxSelectionChangedTrigger::Always); | ||
|
|
||
| // Listen for size changes on the comboBox | ||
| m_comboBox.SizeChanged([this](auto const & /*sender*/, auto const & /*args*/) { RefreshSize(); }); |
Contributor
There was a problem hiding this comment.
Isn't this going to create Thread safety concerns? The lambda captures this but doesn't ensure the object lifetime. Consider using something like
auto weakThis = winrt::get_weak(*this);
m_comboBox.SizeChanged([weakThis](auto const & /*sender*/, auto const & /*args*/) {
if (auto strongThis = weakThis.get()) {
strongThis->RefreshSize();
}
});
| }>; | ||
|
|
||
| export interface PickerXamlProps extends ViewProps { | ||
| /** |
Contributor
There was a problem hiding this comment.
Consider adding a disabled prop for better accessibility support.
|
|
||
| // Suspend event handlers during programmatic updates to avoid triggering | ||
| // change events. Using RAII ensures handlers are always re-attached. | ||
| WithEventsSuspended([&]() { |
Contributor
There was a problem hiding this comment.
Good pattern to avoid recursive event firing during programmatic updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adding a sample XAML Native Component to SAmpleAppFabric, t to ease out the testing part
Type of Change
Why
Will simplify the testing of Accessibility for XAML island
What
Added a Xaml Native Component and added in to the SampleFabricApp
Screenshots
xamlws.mp4
Testing
Tested in Sample Fabric
Changelog
Should this change be included in the release notes: no
Microsoft Reviewers: Open in CodeFlow